﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;

namespace yule.IService.Sys
{
    /// <summary>
    /// 地区服务
    /// </summary>
    [ServiceContract]
    public interface IRegion
    {
        /// <summary>
        /// 获取地区
        /// </summary>
        /// <param name="id">地区Id</param>
        /// <returns></returns>
        [OperationContract]
        [FaultContract(typeof(yule.Common.WCF.ServiceException))]
        yule.Model.Sys.Region GetRegion(string id);

        /// <summary>
        /// 获取所有地区
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        [FaultContract(typeof(yule.Common.WCF.ServiceException))]
        IList<yule.Model.Sys.Region> GetRegionList();

        /// <summary>
        /// 更新
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        [OperationContract]
        [FaultContract(typeof(yule.Common.WCF.ServiceException))]
        bool Update(Model.Sys.Region model);
    }
}